# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4

inherit vala waf

DESCRIPTION="A lightweigth terminal written in Vala"
HOMEPAGE="http://gitorious.org/valaterm/"
SRC_URI="http://vala-overlay.googlecode.com/files/${P}.tar.bz2"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="nls +gtk3 -debug"

RDEPEND=">=dev-libs/glib-2.14:2
	!gtk3? ( >=x11-libs/gtk+-2.16:2
		   >=x11-libs/vte-0.20:0 )
	gtk3? ( >=x11-libs/gtk+-3.0:3
		  >=x11-libs/vte-0.20:2.90 )"
DEPEND="${RDEPEND}
	!gtk3? ( >=dev-lang/vala-0.10 )
	gtk3? ( >=dev-lang/vala-0.13.2 )
	nls? ( sys-devel/gettext
		 dev-util/intltool )
	dev-util/pkgconfig"

DOCS="AUTHORS NEWS README TODO"

if use gtk3; then
	VALA_REQUIRED_VERSION="0.14"
else
	VALA_REQUIRED_VERSION="0.12"
fi

src_configure() {
	use nls || WCONF="${WCONF} --disable-nls"
	use debug && WCONF="${WCONF} --debug"
	use gtk3 && WCONF="${WCONF} --with-gtk3"

	waf_src_configure
}
